package summer_vacation.liqiqi.day17;

/**
 * Created by uw on 2015/8/29.
 */
public class tuxing {
    public static void main(String[] args) {
        int[][] a = new int[5][5];
        int n=1;
        int i;
        int j;
        for(i=0;i<5;i++){
            for(j=0;j<5;j++){
                System.out.println(n+"\t");
                n++;
                if(j==4){
                    System.out.println();
                    i++;
                    n++;
                    break;
                }
            }
            j--;
            a[i][j]=n;
            System.out.println(a[i][j]);
            n++;
            if(n==10){
                for(i=3;i>=1;i--){
                    a[i][j]=n;
                    System.out.print(a[i][j]);
                    n++;
                    if(n==13){
                        j++;
                        for(i=1;i<=2;i++){
                            a[i][j]=n;
                            System.out.print(a[i][j]);
                            n++;
                            if(n==16){
                                break;
                            }
                        }
                    }
                }
            }
        }
    }
}
